﻿@model IEnumerable<Lucene.Models.Employee>
@{
    ViewBag.Title = "Index";
}

@using (Html.BeginForm()) {
   @Html.TextBox("LastName")
   <div>
        <button type="submit">查询</button>
   </div>
}

<table>
    <tr>
        <th>
            LastName
        </th>
        <th>
            FirstName
        </th>
        <th>
            Title
        </th>
        <th>
            TitleOfCourtesy
        </th>
        <th>
            BirthDate
        </th>
        <th></th>
    </tr>
@if (Model != null) { 
foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.LastName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FirstName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TitleOfCourtesy)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BirthDate)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.EmployeeID }) |
            @Html.ActionLink("Details", "Details", new { id=item.EmployeeID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.EmployeeID })
        </td>
    </tr>
}
}

</table>